<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ include file="/jsp/common/common_head.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
<title>鹿图旅游语音播报平台</title>
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<%@ include file="/jsp/common/common_script.jsp"%>
<style type="text/css">
</style>
</head>
<body>
<script type="text/javascript">$.loading(true);</script>
<div>
	<div>
		<form id="goodsForm"  method="POST" enctype="multipart/form-data">
		<s:hidden name="goodsClass" id="goodsClassHidden"></s:hidden>
		<s:hidden name="resortDto.goodsClass" id="goodsClass"></s:hidden>
		
		<s:if test="resortDto.goodsClass == 1">
		<s:set var="className" value="'景区'"></s:set>
		</s:if>
		<s:if test="resortDto.goodsClass == 2">
		<s:set var="className" value="'酒店'"></s:set>
		</s:if>
		<s:if test="resortDto.goodsClass == 3">
		<s:set var="className" value="'美食'"></s:set>
		</s:if>
		<s:if test="resortDto.goodsClass == 4">
		<s:set var="className" value="'购物'"></s:set>
		</s:if>
		<s:if test="resortDto.goodsClass == 5">
		<s:set var="className" value="'娱乐'"></s:set>
		</s:if>
		
		<s:hidden name="id" id="id"></s:hidden>
		<s:hidden name="resortDto.id" id="resortid"></s:hidden>
		<s:hidden name="showPreviewFlg" id="showPreviewFlg"></s:hidden>
		<s:hidden name="showMapFlg" id="showMapFlg"></s:hidden>
			<table border="0" class="queryTable" width="98%" height="auto" style="margin-bottom:0px;" id="goodsTable">
				<tr>	
					<td class="queryTitle" style="width:10%;"><s:property value="#className"/>名</td>
					<td class="queryContent" style="width:40%;">
						<s:textfield id="userid" name="resortDto.name" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 350px"/>
					</td>
					<td class="queryTitle" id="resortAreaTitle" style="width:10%;"><s:property value="#className"/>所在地</td>
					<td class="queryContent" style="width:40%;">
						<s:hidden id="hiddenAreaId0" name="resortDto.selectAreaId0"></s:hidden>
						<s:hidden id="hiddenAreaId" name="resortDto.selectAreaId"></s:hidden>
						<s:hidden id="hiddenAreaId2" name="resortDto.selectAreaId2"></s:hidden>
						<%-- <input class="easyui-combobox" id="selectResortAreaPro" name="resortDto.areaId" style="width:100px" url='${ctx}/goods/getCodesForCombox.action' data-options="valueField:'id', textField:'text',multiple:false,panelHeight:'auto'" > --%>
						<select id="selectResortArea0" name="resortDto.areaId0" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 65px" ></select>
						<select id="selectResortAreaPro" name="resortDto.areaId" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 135px" onchange="seletC()"></select>
						<select id="selectResortArea2" name="resortDto.areaId2" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 140px"></select>
						<%-- <s:a cssClass="easyui-linkbutton" iconCls="icon-add" href="javascript:void(0)" id="addArea">添加</s:a> --%>
					</td>
				</tr>
				<tr>	
					<td class="queryTitle">介绍</td>
					<td class="queryContent" colspan="3">
						<s:textarea id="introduce" name="resortDto.introduce" cols="98" rows="6" cssStyle=""/>
					</td>
					
				</tr>
				<%-- <s:if test="resortDto.goodsClass == 1">
				<tr>	
					<td class="queryTitle">介绍</td>
					<td class="queryContent" colspan="3">
						<s:textarea	id="introduce" name="resortDto.introduce"  cols="98" rows="6" cssStyle=""/>
					</td>
					
				</tr>
				</s:if> --%>
				<s:if test="resortDto.goodsClass == 2">
				<tr>	
					<td class="queryTitle">酒店服务</td>
					<td class="queryContent" colspan="3">
						<s:textarea	id="introduce" name="resortDto.service"  cols="98" rows="6" cssStyle=""/>
					</td>
					
				</tr>
				<tr>	
					<td class="queryTitle">交通</td>
					<td class="queryContent" colspan="3">
						<s:textarea	id="introduce" name="resortDto.traffic"  cols="98" rows="6" cssStyle=""/>
					</td>
					
				</tr>
				</s:if>
				<s:if test="resortDto.goodsClass == 3">
				<tr>	
					<td class="queryTitle">美食特色</td>
					<td class="queryContent" colspan="3">
						<s:textarea	id="introduce" name="resortDto.feature"  cols="98" rows="6" cssStyle=""/>
					</td>
					
				</tr>
				</s:if>
				<tr>	
					<td class="queryTitle">标注</td>
					<td class="queryContent">
					<s:hidden id="hiddenLabels" name="resortDto.hiddenLabels"></s:hidden>
						<select id="selectResortLabels" name="resortDto.labels" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 350px" onchange="seletC()"></select>
					</td>
					<td class="queryTitle">评分</td>
					<td class="queryContent">
					    <s:textfield id="grade" name="resortDto.grade" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 50px"/>
					    (评分:1、2、3、4、5)
					</td>
				</tr>
				<tr>	
					<td class="queryTitle">地址</td>
					<td class="queryContent">
						<s:textfield id="address" name="resortDto.address" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 350px"/>
					</td>
					<td class="queryTitle">经纬度</td>
					<td class="queryContent">
					    <s:textfield id="address" name="resortDto.longitude" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 100px"/>
					    <s:textfield id="address" name="resortDto.latitude" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 100px"/>
					</td>
				</tr>
				<tr>	
					<td class="queryTitle">价格</td>
					<td class="queryContent">
						<s:textfield id="address" name="resortDto.ticketprice1" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 75px"/>
						<%-- <s:textfield id="address" name="resortDto.ticketprice2" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 75px"/>
						<s:textfield id="address" name="resortDto.ticketprice3" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 75px"/>
						<s:textfield id="address" name="resortDto.ticketprice4" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 75px"/>
						<s:textfield id="address" name="resortDto.ticketprice5" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 75px"/> --%>
					</td>
					<td class="queryTitle">优惠价格</td>
					<td class="queryContent">
						<s:textfield id="address" name="resortDto.discountprice" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 80px"/>
					</td>
				</tr>
				<tr>	
					<td class="queryTitle">开放时间</td>
					<td class="queryContent">
						<s:textfield id="address" name="resortDto.worktime" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 350px"/>
					</td>
					<td class="queryTitle">联系电话</td>
					<td class="queryContent">
					    <s:textfield id="address" name="resortDto.telephone" cssClass="inputText easyui-validatebox" data-options=""/>
					</td>
				</tr>
				<s:if test='resortDto.id != null &&  resortDto.id != 0 '>
				<tr>	
					<td class="queryTitle" style="height:20px;">录入用户名</td>
					<td class="queryContent">
						<s:property value="resortDto.username"/>
						<s:hidden id="username" name="resortDto.username"/>
					</td>
					<td class="queryTitle">审核状态</td>
					<td class="queryContent">
					<s:if test='resortDto.state == null || resortDto.state == "" || resortDto.state == "0"'>
					    <font color='red'><s:property value="resortDto.statename"/></font>
					</s:if>
					<s:if test='resortDto.state == "1"'>
						<s:property value="resortDto.statename"/>
					</s:if>
					
						<s:hidden id="statename" name="resortDto.statename"/>
						<s:hidden id="state" name="resortDto.state"/>
					</td>
				</tr>
				</s:if>
				<tr>	
					<td class="queryTitle"><s:property value="#className"/>列表图</td>
					<td class="queryContent" colspan="3">
						<%-- <s:file name="resortDto.iconFile" theme="simple"  label="列表图图片选择"></s:file> 
						<input type="file" id="resIconFile" name="file"/>--%>
						
						<s:hidden id="fileFileName" name="fileFileName"></s:hidden>
						
						<s:file id="resIconRefFile" name="file" theme="simple"  label="列表图图片选择"></s:file>
						<!--<s:a cssClass="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="resIconRefBtn">参照</s:a>
						<s:a cssClass="easyui-linkbutton" iconCls="icon-upload" href="javascript:void(0)" id="uploadResIconRefBtnBtn">上传</s:a>
						<input type="button" id="referenceBtn" value="参照"/>
						<input type="button" value="上传" id="uploadBtn"/> 
						<input type="text" id="resIconFileUrl" name="resortDto.imageUrl" class="inputText" readonly="readonly"/>-->
						<s:hidden id="iconFileUrl" name="resortDto.imageUrl"></s:hidden>
						&nbsp;&nbsp;
						<s:textfield id="resIconFileName" name="resortDto.imageName" cssClass="inputText" readonly="true" cssStyle="width:200px"></s:textfield>
					</td>
				</tr>
				<tr>
					<td class="queryTitle"><s:property value="#className"/>轮播图</td>
					<td class="queryContent" colspan="3">
						<s:hidden id="resPicIndex" name="resPicIndex"></s:hidden>
						<s:iterator value="resortDto.resortPicList" id="attractionsList" status="st">
							<s:hidden name="resortDto.resortPicList[%{#st.index}].newAddFlag"></s:hidden>
							<s:file id="resPicRefFile%{#st.index}" name="file" theme="simple"  label="#{className}轮播图"></s:file>
							<%-- <s:a cssClass="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="resPicRefBtn%{#st.index}">参照</s:a> 
							<s:a cssClass="easyui-linkbutton" iconCls="icon-upload" href="javascript:void(0)" id="uploadResPicRefBtnBtn%{#st.index}">上传</s:a>
							<s:textfield id="resPicFileUrl%{#st.index}" name="resortDto.resortPicList[%{#st.index}].imageName" cssClass="inputText" readonly="true"/>--%>
							<s:hidden id="picFileUrl%{#st.index}" name="resortDto.resortPicList[%{#st.index}].imageUrl"></s:hidden>
							&nbsp;&nbsp;
							<s:textfield id="resPicFileName%{#st.index}" name="resortDto.resortPicList[%{#st.index}].imageName" cssClass="inputText" readonly="true" cssStyle="width:200px"></s:textfield>
							&nbsp;&nbsp;
							<s:a cssClass="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="delResortPic%{#st.index}">删除</s:a>
							<s:if test="#st.last">
							</s:if>
							<br>
						</s:iterator>
					<!-- </td>
					<td class="queryContent" colspan="1"> -->
						<div style="text-align:right">
						<s:a cssClass="easyui-linkbutton" iconCls="icon-add" href="javascript:void(0)" id="addResortPic">添加轮播图</s:a>
						</div>
					</td>
				</tr>
				<%-- <tr rowspan="">	
					<td class="queryTitle">景区轮播图</td>
					<td class="queryContent" colspan="3">
					<s:iterator value="resortDto.resortPicList" id="attractionsList" status="st">
						<s:hidden name="resortDto.resortPicList[%{#st.index}].newAddFlag"></s:hidden>
						<s:file name="resortDto.resortPicList[%{#st.index}].imageFile" theme="simple"  label="列表图图片选择"></s:file>
						<s:a cssClass="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="delResortPic">删除</s:a>
						<s:if test="#st.last">
						<s:a cssClass="easyui-linkbutton" iconCls="icon-add" href="javascript:void(0)" id="addResortPic">添加</s:a>
						</s:if></br>
					</s:iterator>
					</td>
				</tr> --%>
			</table>
			<s:hidden name="resPicDelIndex" id="resPicDelIndex"/>
			<s:hidden name="attPicDelIndex" id="attPicDelIndex"/>
			<br>
			<s:if test="resortDto.goodsClass == 1">
			<table border="0" class="queryTable" width="98%" height="auto" style="margin-bottom:0px;" id="goodsTable">
				<s:iterator value="resortDto.attractionsList" id="attractionsList" status="st">
					<tr>
						<td class="queryTitle" rowspan="4" style="width:10%;">景点<s:property value="#st.index+1"/></td>	
						<td class="queryTitle" style="width:10%;">景点名</td>
						<td class="queryContent" style="width:35%;">
							<s:textfield id="userid" name="resortDto.attractionsList[%{#st.index}].name" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 350px"/>
						</td>
						<td class="queryTitle" id="resortAreaTitle" style="width:10%;">景点类型</td>
						<td class="queryContent" style="width:35%">
							<s:select id="attractionsType%{#st.index}" name="resortDto.attractionsList[%{#st.index}].type" list="typeList" listKey="key" listValue="value">
							</s:select>
						</td>
					</tr>
					<tr>
						<td class="queryTitle">景点介绍</td>
						<td class="queryContent" colspan="3">
							<s:textarea	id="introduce" name="resortDto.attractionsList[%{#st.index}].introduce"  cols="86" rows="5" cssStyle=""/>
						</td>
					</tr>
					<tr>
						<td class="queryTitle">经纬度</td>
						<td class="queryContent" colspan="3">
						    <s:textfield id="address" name="resortDto.attractionsList[%{#st.index}].longitude" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 100px"/>
						    <s:textfield id="address" name="resortDto.attractionsList[%{#st.index}].latitude" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 100px"/>
						</td>	
						<%-- <td class="queryTitle">景点图标</td>
						<td class="queryContent">
							<s:file name="resortDto.attractionsList[%{#st.index}].iconFile" theme="simple"  label="图标图片选择"></s:file>
							
							<s:a cssClass="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="attPicRefBtn%{#st.index}">参照</s:a>
							<s:a cssClass="easyui-linkbutton" iconCls="icon-upload" href="javascript:void(0)" id="uploadAttPicRefBtnBtn%{#st.index}">上传</s:a>
							<s:textfield id="attIconPicFileName%{#st.index}" name="resortDto.attractionsList[%{#st.index}].iconFileName" cssClass="inputText" readonly="true"></s:textfield>
							<s:hidden id="attIconPicFileUrl%{#st.index}" name="resortDto.attractionsList[%{#st.index}].iconFileUrl"></s:hidden>
						
						</td> --%>
					</tr>
					<tr>
						<td class="queryTitle">景点语音</td>
						<td class="queryContent" colspan="3">
							<%-- <s:file name="resortDto.attractionsList[%{#st.index}].soundFile" theme="simple"  label="语音选择"></s:file> --%>
							<s:file id="attSoundFile%{#st.index}" name="file" theme="simple"  label="景区轮播图"></s:file>
							&nbsp;&nbsp;
							<s:textfield id="attSoundName%{#st.index}" name="resortDto.attractionsList[%{#st.index}].soundFileName" cssClass="inputText" readonly="true" cssStyle="width:200px"></s:textfield>
							<%-- <s:a cssClass="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="attSoundRefBtn%{#st.index}">参照</s:a>
							<s:a cssClass="easyui-linkbutton" iconCls="icon-upload" href="javascript:void(0)" id="uploadAttSoundRefBtnBtn%{#st.index}">上传</s:a>
							<s:textfield id="attSoundFileName%{#st.index}" name="resortDto.attractionsList[%{#st.index}].soundFileName" cssClass="inputText" readonly="true"></s:textfield> --%>
							<s:hidden id="attSoundUrl%{#st.index}" name="resortDto.attractionsList[%{#st.index}].soundFileUrl"></s:hidden>
						</td>
					</tr>
					<tr>	
						<td class="queryTitle" colspan="5">
						<s:a cssClass="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="delAttractions%{#st.index}">删除 景点<s:property value="#st.index+1"/></s:a>
						<s:if test="#st.last">
						
						</s:if>
						</td>
					</tr>
				</s:iterator>
			</table>

			<div style="margin-top:5px;width:98%;text-align:right" id="">
				<s:a cssClass="easyui-linkbutton" iconCls="icon-add" href="javascript:void(0)" id="addAttractions">景点添加</s:a>
			</div>
			</s:if>
		</form>
	</div>
		<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="addBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" id="doPostData">确定</a>
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" id="doMapPreview">地图预览</a>
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" id="doVerify"><s:property value="#className"/>审核</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="cancelVerify">取消审核</a>
		<s:if test='resortDto.id != null &&  resortDto.id != 0 '>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="doGoodsDel"><s:property value="#className"/>删除</a>
		</s:if>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" id="canclePostData">取消</a>
    	</div>
</div>
    
<div id="selectTypeDlg" class="easyui-dialog" title="行政区域追加" closed="true" style="width:240; height:auto;text-align:center; background: #fff;">
	<div style="padding:10px;">
	<form id="areaForm"  method="POST">
		 <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;省：<select id="selectResortArea" name="areaDto.area_id" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 100px"></select></div> 
	<div>市（区）:<s:textfield id="userid" name="areaDto.name" cssClass="inputText easyui-validatebox" data-options="" cssStyle="width: 100px"/></div> 
	</form>
	</div>
</div>

<script type="text/javascript" src="${ctx }/js/goods/goods_edit.js"></script>
<script type="text/javascript">$(window).load(function(){$.loading(false);});</script>
</body>
</html>
